package com.example.park.weixiu

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.View
import com.alibaba.android.arouter.facade.annotation.Autowired
import com.alibaba.android.arouter.facade.annotation.Route
import com.alibaba.android.arouter.launcher.ARouter
import com.example.lib_base.mvvm.BaseActivity
import com.example.park.R
import com.example.park.databinding.ActivityWeiXiuXqBinding
import dagger.hilt.android.AndroidEntryPoint

@Route(path = "/park/WeiXiuXqActivity")
@AndroidEntryPoint
class WeiXiuXqActivity : BaseActivity<ActivityWeiXiuXqBinding,WeiXiuViewModel>() {
    @Autowired
    @JvmField
    var wxId =""
    override fun initView() {
        ARouter.getInstance().inject(this)
        vm.getWeiXiuXq(wxId.toInt())
    }

    override fun initData() {
        vm.getWeiXiuXqSuccess.observe(this){
            binding.bean=it
            if (it.processingStatus!="已完成"){
                binding.repDetailGroup.visibility=View.VISIBLE
            }
            if (it.processingStatus=="处理中"){
                binding.repDetailProCircle2.setBackgroundResource(R.drawable.shape_solid_darkgreen)
            }
            if (it.processingStatus=="已完成"){
                binding.repDetailProCircle2.setBackgroundResource(R.drawable.shape_solid_darkgreen)
                binding.repDetailProCircle3.setBackgroundResource(R.drawable.shape_solid_darkgreen)
            }
        }
    }

}